;-----------------------------------------------------------------;
;  Copyright (C) 2011, Ryabov Alex. All rights reserved.          ;
;  Distributed under terms of the GNU General Public License.     ;
;  See file COPYING for details.                                  ;
;-----------------------------------------------------------------;
;  Omaha32                                                        ;
;  /sys32/gdt.inc                                                 ;
;-----------------------------------------------------------------;

gdts:
  dw  gdte-$-1
  dd  gdts
  dw	 0

os_code_l:
  dw  0xffff
  dw  0x0000
  db  0x00
  dw  11011111b *256 + cpl_rr_0
  db  0x00

os_data_l:
  dw  0xffff
  dw  0x0000
  db  0x00
  dw  11011111b *256 + dpl_rw_0
  db  0x00

app_code_l:
  dw  0xFFFF
  dw  0
  db  0
  db  cpl_rr_3
  dw  desc_g32+desc_d32+0xF;

app_data_l:
  dw  0xFFFF
  dw  0
  db  0
  db  dpl_rw_3
  dw  desc_g32+desc_d32+0xF;

tss0_l:
  dw  TSS_SIZE - 1
  dw  tss and 0xFFFF
  db  (tss shr 16) and 0xFF
  db  10001001b
  dw  (tss shr 16) and 0xFF00

gdte: